package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;

public class LogCallback extends SequencableRPCCall<String> {

	private String password;
	private String login;
//	private CustomerDTO customerDTO;
	private String sessionID;
	
	public LogCallback(String login_, String password_) {
		login = login_;
		password = password_;
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.log(login, password, this);
	}

	@Override
	public void onSuccess(String sessionId_) {
//		customerDTO = c_;
		sessionID = sessionId_;
		callNext();
	}
//
//	public CustomerDTO getCustomerDTO() {
//		return customerDTO;
//	}

	public String getSessionID() {
		return sessionID;
	}
}